package com.woniu.es;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;

@SpringBootTest
public class test1 {
    @Autowired
    ElasticsearchRestTemplate elasticsearchRestTemplate;

    @Test
    void test1(){
        elasticsearchRestTemplate.createIndex(Item.class);
        elasticsearchRestTemplate.putMapping(Item.class);
       // elasticsearchRestTemplate.delete(Item.class);
    }
}
